import {Component, ViewChild} from "@angular/core";
@Component({
  template:`
    <weui-swiper [options]="options" #swiper>
          <div class="swiper-container">
              <!-- 容器（必选） -->
              <div class="swiper-wrapper">
                  <div class="swiper-slide"  *ngFor="let i of [1,2,3,4,5,6,7,8]">
                      <img src="../assets/trainee{{i}}.png">
                  </div>
              </div>
              <!-- 分页（可选） -->
              <div class="swiper-pagination"></div>
          </div>
      </weui-swiper>
    <div class="footer">
      <img src="assets/honour.jpg">
      <div>
        <h4>领导的认可是鼓励</h4>
        <h4 style="text-indent: 2em;">学员的认可才是荣誉！</h4>
      </div>
    </div>
  `,
  styles:[
    `
      .swiper-slide img{
        width:100vw;
        height:75vh;
        display:inline;
      }
      .footer{
        height:12vh;
        display:flex;
        display:webkit-flex;
        align-items:center;
      }
      .footer img{
        height:10vh;
        width:10vh;
        padding:1vh;
      }
      .footer div{
        flex-grow:1;
      }
      h4{
        margin:10px;
      }
    `
  ]
})
export class TraineesComponent{
  options={
    autoplay: {
      delay: 3000,
    },
  };
  @ViewChild("swiper") swiper;

  ngAfterViewInit(): void {
    console.log(this.swiper);
    this.swiper.swiper.allowTouchMove=false;
  }
}
